-
Notifications
You must be signed in to change notification settings - Fork 7
Sign in with Microsoft #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
token will only contain this field if it's requested in scopes
this just checks that the token was signed using one of the keys listed by the key server. still need to validate the token contents.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #698 +/- ##
==========================================
+ Coverage 35.87% 36.30% +0.42%
==========================================
Files 528 536 +8
Lines 23487 23723 +236
Branches 2850 2869 +19
==========================================
+ Hits 8427 8613 +186
- Misses 14198 14246 +48
- Partials 862 864 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This reverts commit 02c9653.
`sub`, `email`, `family_name`, `given_name`
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
} | ||
|
||
public static class TestEmailClaim extends TestInvalidPayloadField { | ||
String claim() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note test
TestNonEmptyClaim.claim
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
src/test/java/uk/ac/cam/cl/dtg/segue/auth/MicrosoftAuthenticatorTest.java
Fixed
Show fixed
Hide fixed
regular registrations also allow this
Playing around with the server a little bit, I see lots of instances of MicrosoftAuthenticator being created (and, interestingly, each log-in request creates a new instance), but the instance being used is always the same: the one that's been passed in to userAuthenticationManager, which is a singleton. It's possible that my local app is uses less threads than the live app, but even on the live app. However, because the exchange and token access happen while serving the same request, I think it's guaranteed that we only ever access the cache from within the same thread.
when an authentication code cannot be extracted from the callback, return an error rather than just throwing 500
This reverts commit 9d9d4ef.
use our own exceptions, with our own messages. this way, we avoid leaking potentially sensitive information to an attacker.
MSAL4J automatically requested this. A string-replace worked for removing the scope from the authorization URL, but the `/token` endpoint also needs scopes, and I didn't find an easy way to modify the behavior of `.acquireToken`. I ended up just using the same lib used for Raspberry PI and Google authentication.
} | ||
|
||
public static class TestOidClaim extends TestUUIDClaim { | ||
String claim() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note test
TestNonEmptyClaim.claim
} | ||
|
||
public static class TestTidClaim extends TestUUIDClaim { | ||
String claim() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note test
This is still a work in progress. I've opened a PR because I wanted to see if the tests pass.
Pull Request Check List